﻿<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Script file="Sliders.lua" />
  <Frame name="AOSSControlsSliders" inherits="AOSSPanelTemplate">
    <Size>
      <AbsDimension x="400" y="400"/>
    </Size>
    <Anchors>
      <Anchor point="TOPLEFT" />
    </Anchors>    
    <Frames>
      <SimpleHTML name="SlidersSimpleHTML" inherits="ControlsSimpleHTMLTemplate" file="Interface\AddOns\AddOnStudioSamples\Controls\Sliders.html" />

      <Slider name="ExampleSlider" inherits="OptionsSliderTemplate" minValue="0" maxValue="1" valueStep="0.01">
        <Anchors>
          <Anchor point="TOP">
            <Offset x="0" y="-420" />
          </Anchor>
        </Anchors>
        <Layers>
          <Layer level="OVERLAY">
            <Texture name="ControlledTexture" file="Interface\Calendar\Holidays\Calendar_HallowsEndStart">
              <Size>
                <AbsDimension x="120" y="120"/>
              </Size>
              <Anchors>
                <Anchor point="TOP" relativePoint="BOTTOM" >
                  <Offset x="0" y="-20" />
                </Anchor>
              </Anchors>
              <TexCoords top="0" left="0" bottom="0.8" right="0.8"/>
            </Texture>
          </Layer>
        </Layers>
        <Scripts>
          <OnLoad>
            self.type = CONTROLTYPE_SLIDER;
            self.cvar = "example";            
            self:SetValue(1);
          </OnLoad>
          <OnValueChanged>
            --print(value);
            ControlledTexture:SetAlpha(value);
          </OnValueChanged>
        </Scripts>
      </Slider>
    </Frames>
    <Scripts>
      <OnLoad>
        AOSSControlsSliders_OnLoad(self)
      </OnLoad>
    </Scripts>
  </Frame>
</Ui>